<template>
  <div id="app">
    <router-view v-slot="{ Component }">
      <keep-alive :include="['ServerList']">
        <component :is="Component" />
      </keep-alive>
    </router-view>
  </div>
</template>

<script setup>
import { onMounted } from 'vue'
import { useAuthStore } from '@/stores/auth'

const authStore = useAuthStore()

onMounted(() => {
  console.log('📱 App初始化')
  authStore.checkAuth()
})
</script>

<style>
#app {
  width: 100%;
  height: 100%;
  background: #f7f8fa;
  color: #323233;
}

/* 全局样式修复 */
* {
  color: inherit;
}

/* Toast样式 */
:deep(.van-toast) {
  background-color: rgba(50, 50, 51, 0.88) !important;
}

:deep(.van-toast__text) {
  color: #fff !important;
}

/* Popup和Dialog */
:deep(.van-popup) {
  color: #323233;
}

:deep(.van-dialog) {
  color: #323233;
}

:deep(.van-dialog__message) {
  color: #646566;
}

/* 表单组件 */
:deep(.van-cell__title),
:deep(.van-cell__value),
:deep(.van-field__label),
:deep(.van-field__control) {
  color: #323233;
}
</style>

